package com.xwltz.core.constants;

import lombok.Data;
import lombok.Getter;
import lombok.experimental.Accessors;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @description FrameworkConfig
 * @information on version 1.0 be created by @xwltz at 2021/12/28 10:34
 */

@Data
@Accessors(chain = true)
@Component
@ConfigurationProperties(prefix = "framework")
public class FrameworkConfig {

	/**
	 * 项目名称
	 */
	private String name;

	/**
	 * 版本
	 */
	private String version;

	/**
	 * 版权年份
	 */
	private String copyrightYear;

	/**
	 * 实例演示开关
	 */
	private boolean demoEnabled;

	/**
	 * 缓存懒加载
	 */
	private boolean cacheLazy;

	/**
	 * 获取地址开关
	 */
	@Getter
	private static boolean addressEnabled;

	public void setAddressEnabled(boolean addressEnabled) {
		FrameworkConfig.addressEnabled = addressEnabled;
	}
}
